import App from './App.vue'
import { createApp } from 'vue';
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
import router from './router/index'
// 引入公共样式
import '@/assets/style/index.scss'

// 缓存 pinia
import piniaPersist from 'pinia-plugin-persist'
import { createPinia } from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App);

// 注册icon图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
const pinia = createPinia()
pinia.use(piniaPersist)
app.use(pinia)
app.use(Avue);
app.use(router);
app.mount('#app')